home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
gnu
/
progutil
/
stdwin.zoo
/
conf
/
mkdep
< prev
next >
Wrap
Text File
|
1989-10-17
|
532b
|
23 lines
#! /bin/sh
# Shell script to create dependency lines for inclusion in a Makefile.
# This is done by pulling each file through the C preprocessor,
# filtering all '# <file> 1' lines out and doing some substitutions
# on them. Since the format of these lines may be different on your
# system, you may have to modify the sed command below.
ARGS=
while :
do
case $1 in
-*) ARGS="$ARGS $1"; shift;;
*) break;;
esac
done
for file
do
obj=`basename $file .c`.o
cc $ARGS -E $file |
sed -n '/^# 1 "\(.*\)".*$/s//'$obj': \1/p'
done